---
title: " Workflow Action Management "
space: "Frappe Framework"
url: "https://support.aakvatech.com/Frappe Framework/workflow_action_management"
updated: "2026-07-22"
---

# Workflow Action User Manual

## 1. Overview
The **Workflow Action** module in **ERPNext** manages approval workflows, automating document transitions based on predefined rules. It allows users with specific roles to approve, reject, or take necessary actions on documents within the system.

## 2. Key Features
- **Automated Workflow Actions:** Streamlines document approvals.
- **Role-Based Access Control:** Ensures only authorized users can approve or reject documents.
- **Email Notifications:** Sends workflow action emails to the right users.
- **Dynamic Linking:** Links workflow actions to documents and users.
- **Permission Control:** Assigns workflow actions to permitted roles.

## 3. Pre-Requisites
Before using the workflow action module, ensure the following:
- **Workflow Setup in ERPNext** (Configured via Workflow settings).
- **User Roles Assigned** (Ensure users have the correct permissions for approvals).
- **Email Alerts Enabled** (To notify approvers of pending actions).

## 4. Step-by-Step Usage
### Step 1: Setting Up a Workflow Action
1. Navigate to **Workflow Action** in ERPNext.
2. Click **New** to create a new workflow action.
3. Enter the required details:
   - *Reference Document Type (e.g., Leave Application, Expense Claim, etc.)*
   - *Reference Name (The specific document ID to be approved)*
   - *Workflow State (Current stage of the document in the workflow)*
   - *Permitted Roles (Roles allowed to take action on the workflow)*
4. Click **Save** to store the workflow action.

### Step 2: Assigning Workflow Actions to Users
1. Navigate to **Workflow Action Permitted Role**.
2. Click **New** and assign the appropriate **Role** that should handle the approval.
3. Save the record.

### Step 3: Approving or Rejecting a Workflow Action
1. Navigate to the document awaiting approval (e.g., Leave Application, Purchase Order, etc.).
2. Click on **Workflow Action**.
3. Select **Approve**, **Reject**, or another available action.
4. Add comments if needed and click **Submit**.
5. The system will transition the document to the next workflow state based on the selection.

## 5. Script Customizations
- **Automate Email Alerts**: Use the `send_workflow_action_email()` function to trigger email notifications.
- **Restrict Approvals to Specific Roles**: Modify the `has_permission()` function to enforce role-based restrictions.
- **Customize Action Buttons**: Update `frappe.ui.form.on("Workflow Action")` in the custom script.

## 6. Troubleshooting (Common Errors and Resolutions)
| Error | Cause | Solution |
|-------|-------|----------|
| *No workflow action found* | Workflow not configured for the document type | Ensure a workflow exists for the selected document type |
| *Approval button not visible* | User lacks permission | Assign the correct role under **Workflow Action Permitted Role** |
| *Email alerts not sent* | Email notification not configured | Enable **Email Alerts** in the Workflow settings |

## 7. User Roles and Permissions
### Roles Available:
- **System Manager:** Full control over workflows and permissions.
- **Workflow Approver:** Can approve, reject, and comment on workflow actions.
- **Read-Only Users:** Can view workflow actions but cannot approve/reject.

### Permissions Matrix
| Action | System Manager | Workflow Approver | Read-Only |
|--------|---------------|----------------|-----------|
| Create Workflow Action | ✅ | ❌ | ❌ |
| Approve/Reject Action | ✅ | ✅ | ❌ |
| View Workflow Action | ✅ | ✅ | ✅ |
| Assign Permitted Roles | ✅ | ❌ | ❌ |

## 8. Key Notes
- Ensure **workflow states** are correctly mapped to prevent workflow interruptions.
- Workflow approvals **must be assigned to permitted roles** for security.
- **Email notifications** should be tested to confirm that they reach the right users.
- Regularly review workflow actions to ensure proper document processing.

---
This manual provides a complete guide to managing **Workflow Actions** in ERPNext. For further assistance, contact the **System Administrator** or refer to **Frappe Documentation**.

